<template>
  <div :style="{ padding: '24px', background: '#fff', minHeight: '360px' }">
    <h1>页面内容 : this is my system index</h1>
    <h2>dayjs当前时间{{dayjs().format('YYYY-MM-DD HH:mm:ss')}}</h2>
    <!-- dayjs().startOf('month').add(1, 'day').set('year', 2018).format('YYYY-MM-DD HH:mm:ss'); -->
    <a-button @click="go">测试跳转</a-button>
    <h1>vuex 组件</h1>
    <vueXX></vueXX>
    <h1>vuex辅助函数 组件</h1>
    <mapvue></mapvue>
    <h1>pinia 组件</h1>
    <pinia></pinia>
    <h1>vue2 组件</h1>
    <v2></v2>
    <h1>HelloWorld 组件</h1>
    <HelloWorld :app_hello="app_hello" />
    <h1>echarts 组件</h1>
    <Echart></Echart>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref, computed } from "vue";
import { useRoute , useRouter } from "vue-router";
import dayjs from 'dayjs';
import HelloWorld from "@components/HelloWorld.vue";
import Echart from "./echarts.vue";
import vueXX from "./vuex.vue";
import mapvue from "./mapvuex.vue";
import pinia from "./pinia.vue";
import v2 from "./vue2.vue";
export default defineComponent({
  components: {
    HelloWorld,
    Echart,
    vueXX,
    mapvue,
    pinia,
    v2
  },
  setup() {
    const app_hello = ref({
      msg: "VUE3 + Vite3",
    });
    let route = useRoute();
    let router = useRouter();
    // console.log(route)
    // console.log(router)
    const go = () => {
      router.push({
        path: "/login",
        // query:{
        //   num:1
        //   }
        //name:'Home',
        //params:{
        //num:1
        //}
      });
    };

    return {
      dayjs,
      app_hello,
      go,
    };
  },
});
</script>
<style lang="less" scoped>
</style>
